home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm8 / 00798_SU-mol.ls < prev    next >
Encoding:
Text File  |  1996-06-10  |  1.6 KB  |  56 lines

  1. on molette monPas
  2.   global g1erSprLoc, gBoutons, gMol, gScopeSu, gPosVideo, gPosDebP, gPosDebS, gPosDebE, gPosFin
  3.   if monPas <> 0 then
  4.     set gMol to gMol + integer((monPas / 8) + 1)
  5.     if gMol < 0 then
  6.       set gMol to 9
  7.     end if
  8.     if gMol > 9 then
  9.       set gMol to 0
  10.     end if
  11.     set gPosVideo to gPosVideo + (monPas mod 240)
  12.     set gPosVideo to gPosVideo - (gPosVideo mod 2)
  13.     if gPosVideo > 239 then
  14.       set gPosVideo to gPosVideo - 239
  15.     else
  16.       if gPosVideo < 0 then
  17.         set gPosVideo to 239 + gPosVideo
  18.       end if
  19.     end if
  20.     gBoutons(habille, g1erSprLoc + 12, "BTGMOL " & gMol)
  21.     gScopeSu(SetTime, gPosDebE + gPosDebS + gPosDebP + gPosVideo)
  22.     go(the frame)
  23.   end if
  24. end
  25.  
  26. on mouseDown
  27.   global gBoutons, g1erSprLoc, gNumSpr, gTraduit, gScopeSu, gPosVideo, gPosDebP, gPosDebS, gPosDebE, gPosFin
  28.   curseur(9)
  29.   set gNumSpr to g1erSprLoc + 12
  30.   set monLocV to the mouseV
  31.   set firstLocH to the mouseH
  32.   set precLocH to firstLocH
  33.   gScopeSu(SetCadence, 0)
  34.   gBoutons(habille, g1erSprLoc + 11, "BTPBOU 1")
  35.   set the text of cast "ZI5" to getAt(gTraduit, 52)
  36.   set gPosVideo to gScopeSu(GetTime) - gPosDebE - gPosDebS - gPosDebP
  37.   repeat while the stillDown = 1
  38.     set monLocH to the mouseH
  39.     set diff to precLocH - monLocH
  40.     if abs(diff) > 3 then
  41.       molette(precLocH - monLocH)
  42.       set precLocH to monLocH
  43.     end if
  44.   end repeat
  45.   set gPosVideo to gScopeSu(GetTime) - gPosDebE - gPosDebS - gPosDebP
  46. end
  47.  
  48. on mouseUp
  49.   global gSurvolPrec, gNumSpr, g1erSprLoc
  50.   if gNumSpr = (g1erSprLoc + 12) then
  51.     set gSurvolPrec to -1
  52.   else
  53.     pass()
  54.   end if
  55. end
  56.